﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SBOKProtal.Master"
    Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="Microhard.WebUI.Protal.Extensions" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    德国世保康SBOK武汉分公司
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPHHeaderImage" runat="server">
    <div class="headimage">
        <div style='background: url("<%=Url.Content("~/Content/images/Protal/SBOK/1.jpg")%>") no-repeat top;
            height: 540px;'>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <%var arts = Html.GetTopArticle(new Microhard.Protal.Models.ArticleModel { IsOnIndex = true }, 5);
      foreach (var a in arts)
      {
    %>
    <div class="etb-7 clean cleaner">
        <div class="float-box w6">
            <div class="m">
                <h1>
                    <%=a.Title%></h1>
                <div class="content">
                    <%=a.ArticleContent%></div>
            </div>
        </div>
        <div class="float-box w6">
            <div class="mt mb">
                <div class="scroll-lr clean">
                    <div class="left" style="opacity: 0.25;">
                        <div>
                        </div>
                    </div>
                    <div class="clip">
                        <div class="content" style="width: 1200px;">
                            <div class="block">
                                <%
          var rightImage = Html.GetFile("右侧小图", a.ArticleID);
          if (rightImage != null)
          {
              string base64String = Convert.ToBase64String(rightImage.Content);
                
                                %>
                                <img width="400" height="300" title="<%=a.Description %>" alt="<%=a.Description %>"
                                    src="<%=String.Format("data:image/png;base64,{0}",base64String)%>">
                                <%} %>
                            </div>
                        </div>
                    </div>
                    <div class="right">
                        <div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <%} %>
    <div class="etb-23 w12 cleaner" data-translation="Open detailed information about this product">
        <div class="m wrapper clean">
            <div class="ml mb mt clean">
                <h2 class="ml mt float-box">
                    推荐产品</h2>
            </div>
            <div class="table-tab-group">
                <div class="items reduced clean">
                    <div class="border-left">
                        <div class="border-right">
                            <div class="scroller-left inactive" style="height: 240px;">
                            </div>
                            <div class="viewport" style="height: 240px;">
                                <div class="workspace clean active " style="width: 900px; height: 240px;" data-tab='{"identifier": "005"}'>
                                    <%var topPrds = Html.GetTopProduct(4);
                                      if (topPrds == null || topPrds.Count == 0)
                                      { 
                                    %>
                                    <div class="float-box item" style="height: 205px;">
                                        <div class="content-wrap">
                                            <div class="text">
                                                暂无产品显示
                                            </div>
                                        </div>
                                    </div>
                                    <%
                                      }
                                      foreach (var p in topPrds)
                                      { %>
                                    <div class="float-box item" style="height: 205px;">
                                        <a title="<%=p.Name %>" class="pos-rel inner-wrap" href="<%=Url.Action("Product", "Home", new { prdID =p.ProductID})%>">
                                            <div class="image">
                                                <%
                                          var rightImage = Html.GetFile("产品简图", p.ProductID);
                                          if (rightImage != null)
                                          {
                                              string base64String = Convert.ToBase64String(rightImage.Content);
                                                %>
                                                <img title="<%=p.Name %>" alt="<%=p.Name %>" src="<%=String.Format("data:image/png;base64,{0}",base64String)%>"
                                                    width="121" height="88"></div>
                                            <%} %>
                                            <div class="content-wrap">
                                                <div class="text">
                                                    <%=p.ShortDescription %>
                                                    <span class="nowrap">
                                                        <%=p.SKU %></span></div>
                                                <div class="highlight-arrow">
                                                    <span>点击查看产品明细</span></div>
                                            </div>
                                        </a>
                                    </div>
                                    <%} %>
                                </div>
                            </div>
                            <div class="scroller-right inactive" style="height: 240px;">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
